#ifndef ENTRY_H
#define ENTRY_H
//  File:         Entry.h
//  Author:       Scott Nordmann & Lauren Wallace
//  Description:  A class definition for the Entry.
#include <string>
#include <vector>
#include "Tag.h"
#include "TagSpec.h"


class Entry
{
public:

	//entry creation
	Entry(const std::string& creator);
	Entry(const std::string& creator,const std::string& titl, const std::string& cont);
	virtual ~Entry();
	virtual void populate();
	//tagging
	void tag(Tag& currentTag);
	//displaying
	virtual void display() const;
	void displayTitle() const;//displays the title of the entry for lists
	virtual void displaySummary() const;
	void displayTags()const;
	//access
	//Title
	void setTitle(const std::string& titl);
	std::string getTitle() const;
	//Content
	void setContent(const std::string& cont);
	std::string getContent() const;
	//Creator
	void setCreatorName(const std::string& crea);
	std::string getCreatorName() const;
	//sendTo
	void setSendTo(const std::string& send = "");
	std::string getSendTo() const; 
	//operators
	virtual bool Entry::operator==(const Entry& e) const;
	virtual bool Entry::operator!=(const Entry& e) const;
	virtual bool Entry::operator<(const Entry& e) const;
	virtual bool Entry::operator>(const Entry& e) const;

private:
	std::string title;
	std::string content;
	std::string creatorName;
	std::string sendTo ;
	std::vector<Tag*> tags;
};
//
//access functions
//
inline std::string Entry::getTitle() const { return title; }
inline std::string Entry::getContent() const { return content; }
inline std::string Entry::getCreatorName() const { return creatorName; }
inline std::string Entry::getSendTo() const { return sendTo; }

//
//overloaded operators
//
inline bool Entry::operator==(const Entry& e) const
{
	return (getTitle() == e.getTitle());
}

inline bool Entry::operator!=(const Entry& e) const
{
	return !(*this == e);
}

inline bool Entry::operator<(const Entry& e) const
{
	return (getTitle() < e.getTitle());
}

inline bool Entry::operator>(const Entry& e) const
{
	return !(*this < e || *this == e);
}

#endif